<template>
    <div class="confirmOrder">
        <div class="confirmOrder-header">
            <div class="header-content">
                <p>
                    <i class="el-icon-s-order"></i>
                </p>
                <p>确认订单</p>
                <router-link to></router-link>
            </div>
        </div>
        <div class="section-goods">
            <div class="goods-list">
                <ul>
                    <li v-for="item in getCheckShopList" :key="item.id">
                        <img :src="'http://106.15.179.105:3000/' + item.productImg">
                        <span class="pro-name">{{item.productName}}</span>
                        <span class="pro-price">{{item.price}}元 x {{item.num}}</span>
                        <span class="pro-status"></span>
                        <span class="pro-total">{{item.price * item.num}}元</span>
                    </li>
                </ul>
            </div>
        </div>
        <div class="section-bar">
            <div class="btn">
                <router-link to="/shopCart" class="btn-base btn-return">返回购物车</router-link>
                <a href="javascript:void(0);" class="btn-base btn-primary" @click="addOrder">结算</a>
            </div>
        </div>
    </div>
</template>

<script>
import { mapGetters, mapActions } from "vuex";
import order from "../http/order.js";

export default {
  name: "ConfimOrder",
  data() {
    return {};
  },
  created() {
    console.log(this.getCheckShopList);
  },
  computed: {
    ...mapGetters(["getCheckShopList"])
  },
  methods: {
    ...mapActions(["toShop"]),
    addOrder(){
        this.$router.push({ path: "/orders" });
    }
  }
};
</script>

<style scoped>
.confirmOrder {
  background-color: #f5f5f5;
  padding-bottom: 20px;
}
/* 头部CSS */
.confirmOrder .confirmOrder-header {
  background-color: #fff;
  border-bottom: 2px solid #ff6700;
  margin-bottom: 20px;
}
.confirmOrder .confirmOrder-header .header-content {
  width: 1225px;
  margin: 0 auto;
  height: 80px;
}
.confirmOrder .confirmOrder-header .header-content p {
  float: left;
  font-size: 28px;
  line-height: 80px;
  color: #424242;
  margin-right: 20px;
}
.confirmOrder .confirmOrder-header .header-content p i {
  font-size: 45px;
  color: #ff6700;
  line-height: 80px;
}
.confirmOrder .section-goods {
  margin: 0 48px;
}
.confirmOrder .section-goods p.title {
  color: #333;
  font-size: 18px;
  line-height: 40px;
}
.confirmOrder .section-goods .goods-list {
  padding: 5px 0;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}
.confirmOrder .section-goods .goods-list li {
  padding: 10px 0;
  color: #424242;
  overflow: hidden;
}
.confirmOrder .section-goods .goods-list li img {
  float: left;
  width: 30px;
  height: 30px;
  margin-right: 10px;
}
.confirmOrder .section-goods .goods-list li .pro-name {
  float: left;
  width: 650px;
  line-height: 30px;
}
.confirmOrder .section-goods .goods-list li .pro-price {
  float: left;
  width: 150px;
  text-align: center;
  line-height: 30px;
}
.confirmOrder .section-goods .goods-list li .pro-status {
  float: left;
  width: 99px;
  height: 30px;
  text-align: center;
  line-height: 30px;
}
.confirmOrder .section-goods .goods-list li .pro-total {
  float: left;
  width: 190px;
  text-align: center;
  color: #ff6700;
  line-height: 30px;
}
.confirmOrder .section-bar {
  padding: 20px 48px;
  border-top: 2px solid #f5f5f5;
  overflow: hidden;
}
.confirmOrder .section-bar .btn {
  float: right;
}
.confirmOrder .section-bar .btn .btn-base {
  float: left;
  margin-left: 30px;
  width: 158px;
  height: 38px;
  border: 1px solid #b0b0b0;
  font-size: 14px;
  line-height: 38px;
  text-align: center;
}
.confirmOrder .section-bar .btn .btn-return {
  color: rgba(0, 0, 0, 0.27);
  border-color: rgba(0, 0, 0, 0.27);
}
.confirmOrder .section-bar .btn .btn-primary {
  background: #ff6700;
  border-color: #ff6700;
  color: #fff;
}
.confirmOrder .section-bar {
  padding: 20px 48px;
  border-top: 2px solid #f5f5f5;
  overflow: hidden;
}
.confirmOrder .section-bar .btn {
  float: right;
}
.confirmOrder .section-bar .btn .btn-base {
  float: left;
  margin-left: 30px;
  width: 158px;
  height: 38px;
  border: 1px solid #b0b0b0;
  font-size: 14px;
  line-height: 38px;
  text-align: center;
}
.confirmOrder .section-bar .btn .btn-return {
  color: rgba(0, 0, 0, 0.27);
  border-color: rgba(0, 0, 0, 0.27);
}
.confirmOrder .section-bar .btn .btn-primary {
  background: #ff6700;
  border-color: #ff6700;
  color: #fff;
}
</style>